#!/usr/bin/env bash

if [ "$1"x == "x" ]; then
    clang-format -style=file -i $1
else
    # clang-format -style=file -i *.c *.h
    # find . -name "*.c" -o -name "*.h" -exec clang-format -style=file -i {} \;
    find . -name "*.c" -exec clang-format -style=file -i {} \;
    find . -name "*.h" -exec clang-format -style=file -i {} \;
fi

